package com.example.springai.controller;

import java.util.*;

public class Tool {
    private String type;
    private Function function;

    public Tool(String type, Function function) {
        this.type = type;
        this.function = function;
    }

    public static class Function {
        private String name;
        private String description;
        private Parameters parameters;

        public Function(String name, String description, Parameters parameters) {
            this.name = name;
            this.description = description;
            this.parameters = parameters;
        }

        public static class Parameters {
            private String type;
            private Map<String, Property> properties;
            private List<String> required;

            public Parameters(String type, Map<String, Property> properties, List<String> required) {
                this.type = type;
                this.properties = properties;
                this.required = required;
            }

            public static class Property {
                private String type;
                private String description;

                public Property(String type, String description) {
                    this.type = type;
                    this.description = description;
                }
            }
        }
    }
}
